<?php

namespace App\Http\Controllers\Backend;


use App\Models\SiteCate;
use App\Service\Tree;

class SiteCateController extends BaseController
{
    protected $channel;

    // 栏目管理
    public function initialize()
    {
        parent::initialize();

        $this->model = 'SiteCate';
    }

    // 父级
    // 添加，修改，删除，列表，停用 操作


    // 排序
    public function onRank()
    {
        $manage = $this->checkManage($this->model);
        if($manage === false){
            return $this->error($manage->getError());
        }

        $result = $manage->onRank();
        if($result === false){
            return $this->error($manage->getError());
        }

        return $this->success([], '更新成功！');
    }

}


